package logging;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.LogManager;
import java.util.logging.Logger;
import java.util.logging.Level;

/**
 * Class containing the static logger to be used.
 * @author pcdejager
*/
public final class Loggers {
    /**
     * Log manager instance.
     */
    private static final LogManager MANAGER = LogManager.getLogManager();
    /**
     * Main logger.
     */
    private static final Logger LOGGER = Logger.getLogger("confLogger");
    static {
        try {
            MANAGER.readConfiguration(
                    new FileInputStream(
                            "src/main/resources/logging.properties"));
        } catch (IOException exception) {
            LOGGER.log(
                    Level.SEVERE,
                    "Error in loading configuration",
                    exception);
        }
    }

    /**
     * Hide default constructor.
     */
    private Loggers() {
    }
}
